// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  sbsa_uart_c_union_define.h
// Project line  :  ICT
// Department    :  CAD Development Department
// Author        :  Huawei
// Version       :  V100
// Date          :  2016/7/1
// Description   :  The description of P680 project
// Others        :  Generated automatically by nManager V4.2 
// History       :  Huawei 2018/04/10 11:24:21 Create file
// ******************************************************************************

#ifndef __SBSA_UART_C_UNION_DEFINE_H__
#define __SBSA_UART_C_UNION_DEFINE_H__

/* Define the union U_UARTDR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0 : 20  ; /* [31:12] */
        unsigned int    data  : 12  ; /* [11:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTDR;

/* Define the union U_UARTRSR_UARTECR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1 : 28  ; /* [31:4] */
        unsigned int    oe    : 1  ; /* [3] */
        unsigned int    be    : 1  ; /* [2] */
        unsigned int    pe    : 1  ; /* [1] */
        unsigned int    fe    : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTRSR_UARTECR;

/* Define the union U_UARTFR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2 : 24  ; /* [31:8] */
        unsigned int    txfe  : 1  ; /* [7] */
        unsigned int    rxff  : 1  ; /* [6] */
        unsigned int    txff  : 1  ; /* [5] */
        unsigned int    rxfe  : 1  ; /* [4] */
        unsigned int    busy  : 1  ; /* [3] */
        unsigned int    rsv_3 : 3  ; /* [2:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTFR;

/* Define the union U_UARTIBRD */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_4       : 16  ; /* [31:16] */
        unsigned int    baud_divint : 16  ; /* [15:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTIBRD;

/* Define the union U_UARTFBRD */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_5       : 26  ; /* [31:6] */
        unsigned int    baud_divfac : 6  ; /* [5:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTFBRD;

/* Define the union U_UARTLCR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_6 : 24  ; /* [31:8] */
        unsigned int    sps   : 1  ; /* [7] */
        unsigned int    wlen  : 2  ; /* [6:5] */
        unsigned int    fen   : 1  ; /* [4] */
        unsigned int    stp2  : 1  ; /* [3] */
        unsigned int    eps   : 1  ; /* [2] */
        unsigned int    pen   : 1  ; /* [1] */
        unsigned int    brk   : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTLCR_H;

/* Define the union U_UARTCR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_7  : 22  ; /* [31:10] */
        unsigned int    rxe    : 1  ; /* [9] */
        unsigned int    txe    : 1  ; /* [8] */
        unsigned int    lbe    : 1  ; /* [7] */
        unsigned int    rsv_8  : 4  ; /* [6:3] */
        unsigned int    sirlp  : 1  ; /* [2] */
        unsigned int    siren  : 1  ; /* [1] */
        unsigned int    uarten : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTCR;

/* Define the union U_UARTIFLS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_9    : 26  ; /* [31:6] */
        unsigned int    rxiflsel : 3  ; /* [5:3] */
        unsigned int    txiflsel : 3  ; /* [2:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTIFLS;

/* Define the union U_UARTIMSC */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_10 : 21  ; /* [31:11] */
        unsigned int    oeim   : 1  ; /* [10] */
        unsigned int    beim   : 1  ; /* [9] */
        unsigned int    peim   : 1  ; /* [8] */
        unsigned int    feim   : 1  ; /* [7] */
        unsigned int    rtim   : 1  ; /* [6] */
        unsigned int    txim   : 1  ; /* [5] */
        unsigned int    rxim   : 1  ; /* [4] */
        unsigned int    rsv_11 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTIMSC;

/* Define the union U_UARTRIS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_12 : 21  ; /* [31:11] */
        unsigned int    oeris  : 1  ; /* [10] */
        unsigned int    beris  : 1  ; /* [9] */
        unsigned int    peris  : 1  ; /* [8] */
        unsigned int    feris  : 1  ; /* [7] */
        unsigned int    rtris  : 1  ; /* [6] */
        unsigned int    txris  : 1  ; /* [5] */
        unsigned int    rxris  : 1  ; /* [4] */
        unsigned int    rsv_13 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTRIS;

/* Define the union U_UARTMIS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_14 : 21  ; /* [31:11] */
        unsigned int    oemis  : 1  ; /* [10] */
        unsigned int    bemis  : 1  ; /* [9] */
        unsigned int    pemis  : 1  ; /* [8] */
        unsigned int    femis  : 1  ; /* [7] */
        unsigned int    rtmis  : 1  ; /* [6] */
        unsigned int    txmis  : 1  ; /* [5] */
        unsigned int    rxmis  : 1  ; /* [4] */
        unsigned int    rsv_15 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTMIS;

/* Define the union U_UARTICR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_16 : 21  ; /* [31:11] */
        unsigned int    oeic   : 1  ; /* [10] */
        unsigned int    beic   : 1  ; /* [9] */
        unsigned int    peic   : 1  ; /* [8] */
        unsigned int    feic   : 1  ; /* [7] */
        unsigned int    rtic   : 1  ; /* [6] */
        unsigned int    txic   : 1  ; /* [5] */
        unsigned int    rxic   : 1  ; /* [4] */
        unsigned int    rsv_17 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTICR;

/* Define the union U_UARTPERIPHID0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    partnumber0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPERIPHID0;

/* Define the union U_UARTPERIPHID1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_18      : 24  ; /* [31:8] */
        unsigned int    designer0   : 4  ; /* [7:4] */
        unsigned int    partnumber1 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPERIPHID1;

/* Define the union U_UARTPERIPHID2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_19    : 24  ; /* [31:8] */
        unsigned int    revision  : 4  ; /* [7:4] */
        unsigned int    designer1 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPERIPHID2;

/* Define the union U_UARTPERIPHID3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    periph_id3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPERIPHID3;

/* Define the union U_UARTPCELLID0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pcell_id0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPCELLID0;

/* Define the union U_UARTPCELLID1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pcell_id1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPCELLID1;

/* Define the union U_UARTPCELLID2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pcell_id2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPCELLID2;

/* Define the union U_UARTPCELLID3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pcell_id3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UARTPCELLID3;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_UARTDR          UARTDR          ; /* 0 */
    volatile U_UARTRSR_UARTECR UARTRSR_UARTECR ; /* 4 */
    volatile U_UARTFR          UARTFR          ; /* 18 */
    volatile U_UARTIBRD        UARTIBRD        ; /* 24 */
    volatile U_UARTFBRD        UARTFBRD        ; /* 28 */
    volatile U_UARTLCR_H       UARTLCR_H       ; /* 2C */
    volatile U_UARTCR          UARTCR          ; /* 30 */
    volatile U_UARTIFLS        UARTIFLS        ; /* 34 */
    volatile U_UARTIMSC        UARTIMSC        ; /* 38 */
    volatile U_UARTRIS         UARTRIS         ; /* 3C */
    volatile U_UARTMIS         UARTMIS         ; /* 40 */
    volatile U_UARTICR         UARTICR         ; /* 44 */
    volatile U_UARTPERIPHID0   UARTPERIPHID0   ; /* FE0 */
    volatile U_UARTPERIPHID1   UARTPERIPHID1   ; /* FE4 */
    volatile U_UARTPERIPHID2   UARTPERIPHID2   ; /* FE8 */
    volatile U_UARTPERIPHID3   UARTPERIPHID3   ; /* FEC */
    volatile U_UARTPCELLID0    UARTPCELLID0    ; /* FF0 */
    volatile U_UARTPCELLID1    UARTPCELLID1    ; /* FF4 */
    volatile U_UARTPCELLID2    UARTPCELLID2    ; /* FF8 */
    volatile U_UARTPCELLID3    UARTPCELLID3    ; /* FFC */

} S_sbsa_uart_REGS_TYPE;

/* Declare the struct pointor of the module sbsa_uart */
extern volatile S_sbsa_uart_REGS_TYPE *gopsbsa_uartAllReg;

/* Declare the functions that set the member value */
int iSetUARTDR_data(unsigned int udata);
int iSetUARTRSR_UARTECR_oe(unsigned int uoe);
int iSetUARTRSR_UARTECR_be(unsigned int ube);
int iSetUARTRSR_UARTECR_pe(unsigned int upe);
int iSetUARTRSR_UARTECR_fe(unsigned int ufe);
int iSetUARTFR_txfe(unsigned int utxfe);
int iSetUARTFR_rxff(unsigned int urxff);
int iSetUARTFR_txff(unsigned int utxff);
int iSetUARTFR_rxfe(unsigned int urxfe);
int iSetUARTFR_busy(unsigned int ubusy);
int iSetUARTIBRD_baud_divint(unsigned int ubaud_divint);
int iSetUARTFBRD_baud_divfac(unsigned int ubaud_divfac);
int iSetUARTLCR_H_sps(unsigned int usps);
int iSetUARTLCR_H_wlen(unsigned int uwlen);
int iSetUARTLCR_H_fen(unsigned int ufen);
int iSetUARTLCR_H_stp2(unsigned int ustp2);
int iSetUARTLCR_H_eps(unsigned int ueps);
int iSetUARTLCR_H_pen(unsigned int upen);
int iSetUARTLCR_H_brk(unsigned int ubrk);
int iSetUARTCR_rxe(unsigned int urxe);
int iSetUARTCR_txe(unsigned int utxe);
int iSetUARTCR_lbe(unsigned int ulbe);
int iSetUARTCR_sirlp(unsigned int usirlp);
int iSetUARTCR_siren(unsigned int usiren);
int iSetUARTCR_uarten(unsigned int uuarten);
int iSetUARTIFLS_rxiflsel(unsigned int urxiflsel);
int iSetUARTIFLS_txiflsel(unsigned int utxiflsel);
int iSetUARTIMSC_oeim(unsigned int uoeim);
int iSetUARTIMSC_beim(unsigned int ubeim);
int iSetUARTIMSC_peim(unsigned int upeim);
int iSetUARTIMSC_feim(unsigned int ufeim);
int iSetUARTIMSC_rtim(unsigned int urtim);
int iSetUARTIMSC_txim(unsigned int utxim);
int iSetUARTIMSC_rxim(unsigned int urxim);
int iSetUARTRIS_oeris(unsigned int uoeris);
int iSetUARTRIS_beris(unsigned int uberis);
int iSetUARTRIS_peris(unsigned int uperis);
int iSetUARTRIS_feris(unsigned int uferis);
int iSetUARTRIS_rtris(unsigned int urtris);
int iSetUARTRIS_txris(unsigned int utxris);
int iSetUARTRIS_rxris(unsigned int urxris);
int iSetUARTMIS_oemis(unsigned int uoemis);
int iSetUARTMIS_bemis(unsigned int ubemis);
int iSetUARTMIS_pemis(unsigned int upemis);
int iSetUARTMIS_femis(unsigned int ufemis);
int iSetUARTMIS_rtmis(unsigned int urtmis);
int iSetUARTMIS_txmis(unsigned int utxmis);
int iSetUARTMIS_rxmis(unsigned int urxmis);
int iSetUARTICR_oeic(unsigned int uoeic);
int iSetUARTICR_beic(unsigned int ubeic);
int iSetUARTICR_peic(unsigned int upeic);
int iSetUARTICR_feic(unsigned int ufeic);
int iSetUARTICR_rtic(unsigned int urtic);
int iSetUARTICR_txic(unsigned int utxic);
int iSetUARTICR_rxic(unsigned int urxic);
int iSetUARTPERIPHID0_partnumber0(unsigned int upartnumber0);
int iSetUARTPERIPHID1_designer0(unsigned int udesigner0);
int iSetUARTPERIPHID1_partnumber1(unsigned int upartnumber1);
int iSetUARTPERIPHID2_revision(unsigned int urevision);
int iSetUARTPERIPHID2_designer1(unsigned int udesigner1);
int iSetUARTPERIPHID3_periph_id3(unsigned int uperiph_id3);
int iSetUARTPCELLID0_pcell_id0(unsigned int upcell_id0);
int iSetUARTPCELLID1_pcell_id1(unsigned int upcell_id1);
int iSetUARTPCELLID2_pcell_id2(unsigned int upcell_id2);
int iSetUARTPCELLID3_pcell_id3(unsigned int upcell_id3);

#endif // __SBSA_UART_C_UNION_DEFINE_H__
